package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"varchar(30)" json:"username"`
	Password string `gorm:"varchar(255)" json:"password"`
}
type Life struct {
	gorm.Model
	Title   string `gorm:"varchar(30)" json:"title"`
	Content string `gorm:"varchar(255)" json:"content"`
}
type Like struct {
	gorm.Model
	UserID int  `gorm:"int" json:"user_id"`
	User   User `gorm:"foreignKey:UserID" json:"user"`
	LifeID int  `gorm:"int" json:"life_id"`
	Life   User `gorm:"foreignKey:LifeID" json:"life"`
}
